{% load static %}
<html lang="en">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <link href="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/css/bootstrap.min.css" rel="stylesheet">
    <link href="{% static 'login/css/register.css' %}" rel="stylesheet"/>
    <title>结果</title>
</head>
<body>
<h1>{{ request.session.user_name }}! 欢迎回来 <a href="{% url 'login:image_list'  %}">图片列表</a></h1>
<table class="table table-striped">
    <thead>
    <tr>
        <th>上传者</th>
        <th>图片</th>
        <th>识别结果</th>
    </tr>
    </thead>
    <tbody>
    <tr>
        <td>{{ request.session.user_name }}</td>
        <td>
            <div class="media">
                <div class="media-left media-middle">
                    <img class="media-object" style="width:300px" src='/media/{{ image }}' class="img-responsive">
                </div>
            </div>
        </td>
        <td style="font-size: 30px">
            {% for result in results %}
            <p>{{ result.text }}</p>
            {% endfor %}
        </td>
    </tr>
    </tbody>
</table>


<!-- Optional JavaScript -->
<!-- jQuery first, then Popper.js, then Bootstrap JS -->

<!-- 以下三者的引用顺序是固定的 -->
<script src="https://cdn.bootcss.com/jquery/3.3.1/jquery.js"></script>
<script src="https://cdn.bootcss.com/popper.js/1.15.0/umd/popper.js"></script>
<script src="https://cdn.bootcss.com/twitter-bootstrap/4.3.1/js/bootstrap.min.js"></script>

</body>
</html>